package br.ucb.servlets.usuario;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import br.ucb.dao.UsuarioDAO;
import br.ucb.entidade.Usuario;
import br.ucb.service.UsuarioService;
import br.ucb.servlets.AbstractPapirosServlet;

public class LogoutUsuarioServlet extends AbstractPapirosServlet<Usuario, UsuarioService, UsuarioDAO> {

	private static final long serialVersionUID = 1L;

	@Override
	protected void processaRequisicao(HttpServletRequest req,
			HttpServletResponse resp)throws ServletException,IOException {
		
		HttpSession sessao = req.getSession();
		sessao.invalidate();
		
		forward(req, resp, "/index.jsp");
	}
}
